<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
	<title>Group-Buying Meeting Management Details</title>

	<link rel="stylesheet" type="text/css" href="${ctx}/styles/sidecss.css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/widgets/extremecomponents/extremecomponents.css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/scripts/dhtmlxTree/dhtmlxtree.css"/>
	<script type="text/javascript" src="${ctx}/scripts/WinSollAuto.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/base.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/jsUtil.js?webRoot=${ctx}"></script>
	<script type="text/javascript" src="${ctx}/scripts/highchart/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/button.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/zDrag.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/zDialog2.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/dhtmlxTree/dhtmlxtree.js"></script>
	<%@ include file="/commons/meta.jsp" %>
	<!-- jquery dialog -->
	<link rel="stylesheet" href="${ctx}/widgets/jquery/ui/css/jquery-ui.min.css" />
	<script type="text/javascript" src="${ctx}/widgets/jquery/ui/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/goods/js/functions.js"></script>

	<link rel="stylesheet" type="text/css" href="${ctx}/widgets/My97DatePicker/skin/WdatePicker.css"/>
	<script type="text/javascript" src="${ctx}/widgets/My97DatePicker/WdatePicker.js"></script>

	<!-- end -->
	<style>
		.opa{width:100%; height:100%; position:fixed; top:0; left:0; display: none; background: rgba(0,0,0,0.6); z-index:9999999;}
		.opa.on{ display: block; }
		.img{max-height:800px; position:fixed; top:0; left:0; display: none;}
		.img.on{ display: block; }
	</style>

	<%@ include file="/commons/mdmdialog.jsp"%>
	<script type="text/javascript">
        //查看图片
        function viewPic(pid){
            if( $("#" + pid).val() == ''){
                return ;
            }
            var oPa=$('.opa');
            var oImg=$('.img');
            oPa.addClass('on');
            oImg.addClass('on');
            oImg.css({'background': 'url('+ $('#' + pid).val() +') no-repeat center center',"width":"100%","height":"100%","background-position":"50%","background-size":"contain"});
            oImg.addClass('on');
            oImg.click(function(){
                oPa.removeClass('on');
                oImg.removeClass('on');
            });
        }
        //查看视频
        function viewVideo(pid){
            if( $("#" + pid).val() == ''){
                return ;
            }
            window.open($("#" + pid).val());
        }
	</script>
	<style>
		.MenuList a.cancel{width:58px;background: url(../images/MenuBut1_03.gif) no-repeat;}
		.MenuList a.cancel:hover{background: url(../images/MenuBut1_05.gif) no-repeat;}
	</style>
</head>

<body onLoad="WindowSollAuto()" onResize="WindowSollAuto()">
<jsp:include page="/commons/messages.jsp" flush="true"></jsp:include>
<html:form action="/crm/crmHuiShopDayAction.do?method=list" method="post" >

<div class="bosom_one">
	<div class="bosom_top">
		<span class="left"></span>
		<h4>Group-Buying Meeting List Details</h4>
		<div class='MenuList'>
			<a href="${ctx}/crm/crmHdhActivityAction.do?method=hdhActivityList">Back</a>
		</div>
		<span class="right"></span>
	</div>

	<div class="bosom_side">
		<div class="casing">
			<div class="caput">
				<span class="left"></span><span class="right"></span>
			</div>
			<div class="viscera" id="SollAuto">
				<div class="sheet_div">
					<table class="list_add">
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Activity Name：</td>
							<td align="left" width="1%"><c:out value="${hdhActivity.name}"/></td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Review Status：</td>
							<td align="left" width="1%">
								<c:if test="${hdhActivity.audit eq '0'}">Not audit</c:if>
								<c:if test="${hdhActivity.audit eq '1'}"><font color="green">pass the audit</font></c:if>
								<c:if test="${hdhActivity.audit eq '2'}"><font color="red">Refuse to review</font></c:if>
							</td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<c:if test="${hdhActivity.audit==2 }">
							<tr>
								<td class="formTable" width="1%"><font color='red'>*</font>Review reasons for rejection：</td>
								<td align="left" width="1%">${empty hdhActivity.noPassReason?'Not filled':hdhActivity.noPassReason}</td>
								<td colspan="4">&nbsp;</td>
							</tr>
						</c:if>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Activity Start Time：</td>
							<td align="left" width="1%"><c:out value="${hdhActivity.startTime}"/></td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Activity End Time：</td>
							<td align="left" width="1%"><c:out value="${hdhActivity.endTime}"/></td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Distributor Name：</td>
							<td align="left" width="1%"><c:out value="${hdhActivity.dealerName}"/></td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color="#FF0000">*</font>Sales Area：</td>
							<td align="left" width="1%">
								<html:text  property="areaName" styleId="areaName" value="${hdhActivity.areaName}" readonly="true"/>
							</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color="#FF0000">*</font>Group-Buying Meeting Type：</td>
							<td align="left" width="1%">
								<c:if test="${hdhActivity.activityType eq '1'}">Retail</c:if>
								<c:if test="${hdhActivity.activityType eq '2'}">Wholesale</c:if>
							</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color="#FF0000">*</font>Type of the Activity：</td>
							<td align="left" width="1%">
								<html:text  property="itemName" styleId="itemName" value="${hdhActivityDict.itemName}" readonly="true"/>
							</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Rate：</td>
							<td align="left" width="1%"><c:out value="${hdhActivity.hdhRate * 100}"/>&nbsp;&nbsp;%</td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Rebate Rates：</td>
							<td align="left" width="1%"><c:out value="${hdhActivity.hdhRebatePercent * 100}"/>&nbsp;&nbsp;%</td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color="#FF0000" >*</font>Whether an Offline Rebate：</td>
							<td align="left" width="1%">
								<c:if test="${hdhActivity.activityOfflineRebate eq '1'}">yes</c:if>
								<c:if test="${hdhActivity.activityOfflineRebate eq '2'}">no</c:if>
								<c:if test="${hdhActivity.activityOfflineRebate eq null }">no</c:if>
							</td>
						</tr>
						<tr>
							<td class="formTable" width="20%">Total Active Customers：</td>
							<td align="left" width="70%">
								<c:if test="${hdhActivity.activeStoreQty == '' || hdhActivity.activeStoreQty == null}">
									0&nbsp;&nbsp;home
								</c:if>
								<c:if test="${hdhActivity.activeStoreQty != '' && hdhActivity.activeStoreQty != null}">
									<c:out value="${hdhActivity.activeStoreQty}"/>&nbsp;&nbsp;home
								</c:if>

							</td>
						</tr>
						<tr>
							<td class="formTable" width="20%">GMV：</td>
							<td align="left" width="70%">
								<c:out value="${hdhActivity.GVM}"/>&nbsp;&nbsp;yuan
							</td>
						</tr>
						<tr>
							<td class="formTable" width="1%">Rebate：</td>
							<td align="left" width="1%">
								<c:out value="${hdhActivity.callBackProfits * 100}"/>&nbsp;&nbsp;%
							</td>
							<td>&nbsp;</td>
						</tr>
							<tr>

								<td class="formTable" width="1%">Brand active：</td>
								<td align="left" width="1%">
									<c:forEach var="brand" items="${brandStoreList}" varStatus="status">
										[<c:out value="${brand.brandName}"/>]&nbsp;&nbsp;Total Active Customers：<c:out value="${brand.storeActiveNum}"/>&nbsp;&nbsp;home <br/>
									</c:forEach>
								</td>
							</tr>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Activity Photos</td>
							<td align="left" colspan="3" width="80%">
								<input readonly type="text" style="width:618px;" name="bannerImg" id="bannerImg" value="${hdhActivity.bannerImg}" />
								&nbsp;<input type="button" value="To view" style="width:40px;" onclick="javascript:viewPic('bannerImg');"/>
							</td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%">Explanatory picture of Group-Buying Meeting</td>
							<td align="left" colspan="3" width="80%">
								<input readonly type="text" style="width:618px;" name="activityImg" id="activityImg" value="${hdhActivity.activityImg}" />
								&nbsp;<input type="button" value="To view" style="width:40px;" onclick="javascript:viewPic('activityImg');"/>
							</td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%">Promotion Video</td>
							<td align="left" colspan="3" width="80%">
								<input readonly type="text" style="width:618px;" name="extendVideo" id="extendVideo" value="${hdhActivity.extendVideo}" />
								&nbsp;<input type="button" value="To view" style="width:40px;" onclick="javascript:viewVideo('extendVideo');"/>
								<input readonly type="hidden" style="width:618px;" name="videoFileId" id="videoFileId" value="${hdhActivity.videoFileId}" />
								<span style="padding-left:5px;color:red;">The video format is MP4, and the video size cannot exceed 30M</span>
							</td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Payment Method of the Customer：</td>
							<td align="left" width="1%">
								<c:forEach var="item" items="${hdhPayInfoList}" varStatus="status">
									<c:if test="${item.payTypeSign eq '0'}">
										<span style="color:#FF0000">${item.payName}
											<c:if test="${item.payCode eq '31'}">
												(Webank)
											</c:if>
											<c:if test="${item.payCode eq '32'}">
												(Ping An Bank)
											</c:if>
										</span>|
									</c:if>
								</c:forEach>
							</td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%"><font color='red'>*</font>Payment Method of the Distributor：</td>
							<td align="left" width="1%">
								<c:forEach var="item" items="${hdhPayInfoList}" varStatus="status">
									<c:if test="${item.payTypeSign eq '1'}">
										<span style="color:#FF0000">${item.payName}
											<c:if test="${item.payCode eq '31'}">
												(Webank)
											</c:if>
											<c:if test="${item.payCode eq '32'}">
												(Ping An Bank)
											</c:if>
										</span>|
									</c:if>
								</c:forEach>
							</td>
							<td colspan="4">&nbsp;</td>
						</tr>
						<tr>
							<td class="formTable" width="1%">
								Threshold Promotion：
								<html:select styleId="ruleType" property="activeRuleType" value="${hdhActivity.activityRuleType}" disabled="true">
								<html:option value="1"  >Make a reduction and give a fulfil-quota gift according to the amount</html:option>
								<html:option value="2" >Double the reduction and fulfil-quota gift according to the amount</html:option>
								<html:option value="3" >Double the reduction and fulfil-quota gift according to number of pieces</html:option>
								</html:select>
							</td>
						</tr>
						<c:forEach var="item" items="${hdhDiscountInfoList}" varStatus="status">
							<tr>
								<td></td>
								<td>It must be included in the order
									<input  id='mustContainProd' class='select_but mustContainProd' readonly='true' value='${item.mustContainProd}' readonly='readonly' disabled='disabled'/>
									<input type='hidden' Class='mustContainProdId' id='mustContainProdId' value='${item.mustContainProdId}'/>
								</td>
								<td>
									<input type='number' style='width: 70px' class='mustContainQty' value='${item.mustContainQty}' readonly='readonly' disabled='disabled'/>Piece
								</td>
								<c:if test="${hdhActivity.activityRuleType == 3}">
									<td>The number of orders is full
										<input type='number' style='width: 70px' class='activityPieceNum' value='${item.activityPieceNum}' readonly='readonly' disabled='disabled'/>Piece
									</td>
								</c:if>
								<c:if test="${hdhActivity.activityRuleType != 3}">
									<td>The order amount is over
										<input type='number' style='width: 70px' class='activityPrice' value='${item.activityPrice}' readonly='readonly' disabled='disabled'/>yuan
									</td>
								</c:if>
								<td>
									<c:if test="${hdh.activityRuleType != 1}">
										Always Vertical reduction
									</c:if>
									<c:if test="${hdh.activityRuleType == 1}">
										Reduction of
									</c:if>
									<input type='number' style='width: 70px' class='discountPrice' value='${item.discountPrice}' readonly='readonly' disabled='disabled'/>yuan
									<font color='red'></font>
								</td>
								<td>Gift
									<input id='disCountName' class='select_but disCountName' value='${item.prodName}' readonly='readonly' disabled='disabled'/>
									<input type='hidden' Class='disCountId' id='disCountId' value='${item.prodId}'/>
								</td>
								<td>Quantity
									<input type='number' style='width: 70px' class='prodDiscountQty' value='${item.prodQty}' readonly='readonly' disabled='disabled'/>
								</td>
								<td>Proportion of Fees Borne by Hui Order
									<input type='number' style='width: 70px' class='winSalerRatio' value='${item.winSalerRatio}' readonly='readonly' disabled='disabled' oldOrNew='old'/>%
								</td>
								<c:if test="${hdhActivity.activityRuleType != 3}">
									<td>Borne fees of Hui Order
										<input type='number' style='width: 70px' class='winSalerPrice' value='${item.winSalerPrice}' readonly='readonly' disabled='disabled'/>yuan
										<font color='red'></font>
									</td>
								</c:if>
								<c:if test="${hdhActivity.activityRuleType != 1}">
									<td>Double the base ratio
										<input type='number' style='width: 70px' class='doublingMultipleNum' value='${item.doublingMultipleNum}' readonly='readonly' disabled='disabled'/>times
										<font color='red'></font>
									</td>
									<td>Doubling the number of
										<input type='number' style='width: 70px' class='doublingNum' value='${item.doublingNum}' readonly='readonly' disabled='disabled'/>次
										<font color='red'></font>
									</td>
								</c:if>

							</tr>
						</c:forEach>
					</table>
					<table class="list_add" id="prods">
						<tr id="selectProd">
							<td class="formTable" width="22%"><font color="#FF0000">*</font>Activities Goods：</td>
							<td>
								<html:text property="prodName" styleId="prodName" value="${prodName}" styleClass="select_but" onclick="selectPoiProd(this)" readonly="true" />
								<html:hidden property="prodId" styleId="prodId" value="${prodId}" />
							</td>

						</tr>
						<c:forEach var="brand" items="${hdhActivityProductList}" >
							<tr>
								<td>&nbsp;</td>
								<td class="formTable" width="1%"><B>[${brand.brandName}]</B></td>
								<td colspan="4">&nbsp;</td>
							</tr>
							<c:forEach var="item" items="${brand.products}" varStatus="status">
								<tr>
									<td>&nbsp;</td>
									<td align="left" width="1%">
										product:&nbsp;&nbsp;${item.prodName}
									</td>
									<td align="left" width="1%" class="prodPrice">
										Price:&nbsp;&nbsp;${item.prodPrice}yuan
									</td>
									<td align="left" width="1%" class="prodQty">
										Maximum purchase:&nbsp;&nbsp;
										<c:if test="${item.prodQty == 0}">
											<span style="color:#FF0000">不限</span>
										</c:if>
										<c:if test="${item.prodQty != 0}">
											<span style="color:#FF0000">${item.prodQty}</span>
										</c:if>
									</td>
									<td align="left" width="1%" class="mustBuyQty">
										minimum order quantity:&nbsp;&nbsp;
										<c:if test="${item.mustBuyQty == 0}">
											<span style="color:#FF0000">unlimited</span>
										</c:if>
										<c:if test="${item.mustBuyQty != 0}">
											<span style="color:#FF0000">${item.mustBuyQty}</span>
										</c:if>
									</td>
									<td colspan="3">&nbsp;</td>
								</tr>
							</c:forEach>
						</c:forEach>
					</table>
						<tr>
							<td class="formTable" width="1%">Order Amount Limit：</td>
							<td align="left" width="1%"><c:out value="${hdhActivity.upperPrice}"/>yuan</td>
							<td colspan="4">&nbsp;</td>
						</tr>
					</table>
				</div>
			</div>
			<div class="trail">
				<span class="fleft"></span><span class="fright"></span>
			</div>
		</div>
	</div>
	<div class="opa">
		<div class="img" />
	</div>
	<div class="bosom_bottom">
		<span class="left"></span><span class="right"></span>
	</div>
</div>
	</html:form>

</body>
</html>